package com.kehutong.contact.enums;

import org.coraframework.util.HashID;

/**
 * 客户类型
 *
 * @Author: liu jin Hwang
 */
public enum RoleType implements HashID {

    COMMON("1", "普通人"),
    DECISION_MAKER("2", "决策人"),
    SUB_ITEM_DECISION_MAKER("3", "分项决策人"),
    BUSINESS_DECISION("4", "商务决策"),
    FINANCIAL_DECISION("5", "财务决策"),
    USER("6", "使用人"),
    OPINION_INFLUENCER("7", "意见影响人");

    private final String id;
    private final String desc;

    private RoleType(String id, String desc) {
    	this.id = id;
        this.desc = desc;
    }

    public static RoleType get(String desc) {
        RoleType[] roleTypes = values();
        for (RoleType roleType : roleTypes) {
            if (roleType.getDesc().equals(desc)) {
                return roleType;
            }
        }
        return null;
    }

    @Override
    public String getId() {
        return id;
    }
    

	@Override
    public String getDesc() {
        return desc;
    }
    
}
